using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SmartLink.Domain.Entity;
using SmartLink.Domain.ExpandEntity.SystemLogs;
using SmartLink.Domain.IServices;
using SmartLink.IRepository;

namespace SmartLink.Domain.Services
{
    public class SYS_UserLoadingServices : ISYS_UserLoadingServices
    {
        private ISYS_UserLoadingRepo _userLoadingRepository;

        public SYS_UserLoadingServices(ISYS_UserLoadingRepo userLoadingRepository)
        {
            _userLoadingRepository = userLoadingRepository;
        }

        /// <summary>
        /// 添加登录日志
        /// </summary>
        public void AddLoginLog(SYS_UserLoading model)
        {
            _userLoadingRepository.Add(model, null);
        }

        /// <summary>
        /// 获取用户登录日志
        /// </summary>
        /// <param name="deptIds"></param>
        /// <returns></returns>
        public IEnumerable<UserLoadingExpand> GetLoadingLogs(string keyValue, int clientType, IList<int> deptIds, int pageIndex, int pageSize, bool isSearchCount, out int count)
        {
            return _userLoadingRepository.GetLoadingLogs(keyValue, clientType, deptIds, pageIndex, pageSize, isSearchCount, out count);
        }
    }
}
